package com.burnerpat.fl2d.core.weapon;


public abstract class Manufacturer
{
	private String name = "undefined";
	
	private double damageModifier = 0.5;
	private double rateModifier = 0.5;
	
	private Ammunition[] availableAmmo = null;
	private Model[] availableModels = null;
	
	public Manufacturer()
	{
		
	}
	
	public Manufacturer(String pName, Model[] pAvailableModels, Ammunition[] pAvailableAmmo)
	{
		name = pName;
		availableAmmo = pAvailableAmmo;
		availableModels = pAvailableModels;
	}
	
	public Manufacturer(String pName, double pDamageModifier, double pRateModifier, Model[] pAvailableModels, Ammunition[] pAvailableAmmo)
	{
		name = pName;
		damageModifier = pDamageModifier;
		rateModifier = pRateModifier;
		availableAmmo = pAvailableAmmo;
		availableModels = pAvailableModels;
	}
	
	public void setWeightedAttributes(double damageWeight, double rateWeight)
	{
		damageModifier = damageWeight / (damageWeight + rateWeight);
		
		rateModifier = 1.0 - damageModifier;
	}
	
	public String getName()
	{
		return name;
	}
	
	public double getDamageModifier()
	{
		return damageModifier;
	}
	
	public double getRateModifier()
	{
		return rateModifier;
	}
	
	public Ammunition[] getAvailableAmmo()
	{
		return availableAmmo;
	}
	
	public Model[] getAvailableModels()
	{
		return availableModels;
	}
}
